package controller;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import pojo.Reco;
import service.DataPoint;
import util.SerializeObject;
import util.GetPath;

@Controller
public class TestController {

	@RequestMapping(value = "/test", method = { RequestMethod.GET })
	public void test() {
		GetPath getPath = new GetPath();
		String objectPath = getPath.getObjectPath();
		SerializeObject getObject = new SerializeObject();
		Reco reco = getObject.getObject(objectPath);
		Map<Long, List<DataPoint>> map = reco.getMap();
		for (Long len : map.keySet()) {
			List<DataPoint> list = map.get(len);
			for (DataPoint dataPoint : list) {
				System.out.println(dataPoint.getSongId() + "..." + dataPoint.getTime());
			}
		}
	}
}
